package cn.chencq.proxy.timer.handler;

import java.net.Proxy;
import java.util.Set;

import org.jsoup.Connection.Response;
import org.jsoup.nodes.Document;

public interface ProxyHandler {

	public int count = 1000;
	public int pageCount = 1000;

	/**
	 * 获取处理器
	 * 
	 * @return
	 */
	public String getHandler();

	/**
	 * 请求网址
	 * 
	 * @param url
	 * @return
	 */
	public Document requestDoc(String rid, String url, Proxy proxy);

	public Response request(String rid, String url, Proxy proxy);

	/***
	 * 解析抓取的网页数据
	 * 
	 * @param res
	 */
	public int parseResp(String rid, Document doc);

	public int parseResp(String rid, Response res);

	/**
	 * 爬虫网络代理ip
	 * 
	 * @param url
	 */
	public int crawler(String rid, String url, Proxy proxy);

	public void putToCache(String rid, Set<String> list);

}
